from openai import OpenAI

client = OpenAI(
    base_url='http://localhost:8000/v1/',
    api_key='vllm',  # required but ignored
)
chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "system",
            "content": "你是一个能够理解中英文指令并帮助完成任务的智能助手。你的任务是根据用户的需求生成合适的分类任务或生成任务，并准确判断这些任务的类型。请确保你的回答简洁、准确且符合中英文语境。",
        },
        {
            "role": "user",
            "content": "推荐几款茶叶",
        }
    ],

    model='/dev/shm/llm/deepseek-1.5/DeepSeek-R1-Distill-Qwen-1.5B',

    max_tokens=38192,
    temperature=0.7,
    top_p=0.5,
    frequency_penalty=0,
    presence_penalty=2,
    stream=False
)

print(chat_completion)
